<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <ul>
        <li class="one">1</li>
        <li class="one">2</li>
        <li class="one">3</li>
    </ul>
    <script>
     var lis=document.querySelectorAll(".one");
     console.log(lis);
     for(let i=0;i<lis.length;i++){
         lis[i].onclick=function(){
             for(let i=0;i<lis.lenght;i++){
                 lis[i].style.color="#333";
             }
             this.style.color="#54BB47"
         }
     }
    </script>
</body>
</html>